import i18n from '@src/locales'
/** 公司字段 */
export const companyColumns = [
  {
    label: i18n.t('common.base.name'),
    key: 'name',
  },
  {
    label: i18n.t('common.base.phone'),
    key: 'phone',
  },
  {
    label: i18n.t('common.form.type.email'),
    key: 'email',
  },
  {
    label: i18n.t('common.base.address'),
    key: 'address',
  },
  {
    label: i18n.t('common.base.selfServicePortal'),
    key: 'portal',
  },
];

/** 客户字段 */
export const customerSysColumns = [
  {
    label: i18n.t('common.base.product'),
    key: 'product',
  },
  {
    label: i18n.t('common.base.address'),
    key: 'address',
  },
  {
    label: i18n.t('common.base.contact'),
    key: 'linkman',
  }
];

/** 工单字段 */
export const taskColumns = [
  {
    label: i18n.t('common.task.taskType'),
    key: 'templateName',
  },
  {
    label: i18n.t('task.taskState'),
    key: 'state',
  },
  {
    label: i18n.t('common.base.createUser'),
    key: 'createUser',
  },
  {
    label: i18n.t('task.allotUser'),
    key: 'allotUser',
  },
  {
    label: i18n.t('task.executor'),
    key: 'executor',
  },
  {
    label: i18n.t('task.synergies'),
    key: 'synergies',
  },
  {
    label: i18n.t('task.list.displayName.allotTime'),
    key: 'allotTime',
  },
  {
    label: i18n.t('common.base.createTime'),
    key: 'createTime',
  },
  {
    label: i18n.t('task.list.displayName.startTime'),
    key: 'startTime',
  },
  {
    label: i18n.t('task.list.displayName.transferTime'),
    key: 'reallotTime',
  },
  {
    label: i18n.t('common.base.completeTime'),
    key: 'completeTime',
  },
  {
    label: i18n.t('common.fields.eventContact.displayName'),
    key: 'relatedEvent',
  },
];

/** 故障库 */
export const faultLibraryColumns = [
  {
    label: i18n.t('common.form.preview.faultLibrary.concatLabel1'),
    key: 'productType',
  },
  {
    label: i18n.t('common.form.preview.faultLibrary.concatLabel2'),
    key: 'faultScene',
  },
  {
    label: i18n.t('common.form.preview.faultLibrary.concatLabel3'),
    key: 'faultReason',
  },
  {
    label: i18n.t('common.form.preview.faultLibrary.concatLabel4'),
    key: 'faultDetails',
  },
  {
    label: i18n.t('common.form.preview.faultLibrary.concatLabel5'),
    key: 'budgetAmount',
  },
]

/** 回执字段 */
export const receiptColumns = [
  {
    label: i18n.t('common.base.sparePart'),
    key: 'sparepart',
  },
  {
    label: i18n.t('common.form.type.serviceIterm'),
    key: 'service',
  },
  {
    label: i18n.t('common.form.type.systemAutograph'),
    key: 'autograph',
  }
];

/** 附加组件字段 */
export const cardSysColumns = [
  {
    label: i18n.t('task.list.operator'),
    key: 'userName',
  },
  {
    label: i18n.t('task.list.operateTime'),
    key: 'updateTime',
  },
  {
    label: i18n.t('task.list.strokeDistance'),
    key: 'distance',
  }
];

/** 工单审核字段 */
export const taskCreateAuditColumns = [
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.createApproveUser'),
    key: 'createApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.createApproveTime'),
    key: 'createApproveTime',
  },
]

export const taskAuditColumns = [
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.allotApproveUser'),
    key: 'allotApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.allotApproveSign'),
    key: 'allotApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.allotApproveTime'),
    key: 'allotApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.reallotApproveUser'),
    key: 'reallotApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.reallotApproveSign'),
    key: 'reallotApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.reallotApproveTime'),
    key: 'reallotApproveTime',
  },  

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.startApproveUser'),
    key: 'startApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.startApproveSign'),
    key: 'startApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.startApproveTime'),
    key: 'startApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.pauseApproveUser'),
    key: 'pauseApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.pauseApproveSign'),
    key: 'pauseApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.pauseApproveTime'),
    key: 'pauseApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.offApproveUser'),
    key: 'offApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.offApproveSign'),
    key: 'offApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.offApproveTime'),
    key: 'offApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.finishApproveUser'),
    key: 'finishApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.finishApproveSign'),
    key: 'finishApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.finishApproveTime'),
    key: 'finishApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.costApproveUser'),
    key: 'costApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.costApproveSign'),
    key: 'costApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.costApproveTime'),
    key: 'costApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.reviewApproveUser'),
    key: 'reviewApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.reviewApproveSign'),
    key: 'reviewApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.reviewApproveTime'),
    key: 'reviewApproveTime',
  },

  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.closeApproveUser'),
    key: 'closeApproveUser',
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.closeApproveSign'),
    key: 'closeApproveSign',
    mode: 'sign'
  },
  {
    label: i18n.t('task.setting.taskTypeSetting.approveInfo.closeApproveTime'),
    key: 'closeApproveTime',
  },
];
